// 引入文件
//  公用样式初始样式
require("../../assets/fonts/iconfont.css")
require("../../assets/css/index.less")
require("./movement.less");



// 引入工具函数
const dom = require('../../utils/dom');
const https = require('../../utils/https');

dom.ready(function() {
    dom.addEvent('#start', function() {
        play('#start', '#done', '#suspend', '#locked')
    })

    dom.addEvent('#suspend', function() {
        play('#suspend', '#locked', '#start', '#done')
    })

    dom.addEvent('#done', function() {
        location.href = 'map.html'
    })

    function play(obj1, obj2, obj3, obj4) {
        dom.getEle(obj1).style.display = 'none'
        dom.getEle(obj2).style.display = 'none'
        dom.getEle(obj3).style.display = 'block'
        dom.getEle(obj4).style.display = 'block'
    }
    dom.addEvent('.icon-dingwei', function() {
        location.href = 'map.html'
    })

    https.get('/api/exercise', function(res) {
        console.log(res);
    })
})